<%--
  Created by IntelliJ IDEA.
  User: 老头
  Date: 2023/3/13
  Time: 22:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/BookStore/client/resources/css/head.css" type="text/css"/>
</head>
<body>
<div id="header_box">
    <div id="header_box_inner">
        <div id="header_left">
            <a href="${pageContext.request.contextPath}/client/index.jsp"><img src="${pageContext.request.contextPath}/client/resources/images/logo.jpg" alt="logo.jpg"></a>
        </div>
        <div id="header_right">
            <ul>
                <li><img src="${pageContext.request.contextPath}/client/resources/images/cart.gif" alt="${pageContext.request.contextPath}/client/resources/images/cart.gif">&nbsp;&nbsp;</li>
                <li><a href="${pageContext.request.contextPath}/client/Cart.jsp">购物车</a>&nbsp;|&nbsp;</li>
                <li><a href="">帮助中心</a>&nbsp;|&nbsp;</li>
                <li><a href="${pageContext.request.contextPath}/client/login.jsp">登录</a>&nbsp;|&nbsp;</li>
                <li><a href="">我的账号</a>&nbsp;|&nbsp;</li>
                <%
                    if (session.getAttribute("username") == null) {
                %>
                <a href="register.jsp">新用户注册</a>
                <%
                } else {
                %>
                <a href="">用户退出</a>
                <%
                    }
                %>
                </li>
            </ul>
            <%
                if (session.getAttribute("username") != null) {
            %>
            <div id="hello">
                欢迎您&nbsp;:&nbsp;<%=session.getAttribute("username")%>
            </div>
            <%
                }
            %>

            <%

                if (application.getAttribute("onlineNum") != null) {
            %>
               在线人数&nbsp;:&nbsp;<%=application.getAttribute("onlineNum")%>
            <%
                }
            %>
        </div>
    </div>
</div>
</body>
</html>
